FROM python:3.7-alpine
LABEL maintainer="dywzzj@163.com"
ENV PIPURL "https://pypi.tuna.tsinghua.edu.cn/simple"

RUN apk add --no-cache gcc musl-dev

WORKDIR /flask

COPY ./ ./

RUN pip --no-cache-dir install  -i ${PIPURL} --upgrade pip
RUN pip --no-cache-dir install  -i ${PIPURL}  -r requirements.txt

CMD gunicorn  -c gun.conf flaskr:app